import styles from './index.module.less'
import IconFont from '@/components/IconFont'

interface ListItem {
    code: string
    coverUrl: string
    activityStatusName: string
    activityStatus: number
    activityName: string
    dateDesc: string
    cityDesc: string
    pvStr: string
}

interface ListType {
    list?: ListItem[]
}

const EmploymentActiveContent = ({ list }: ListType) => {
    return (
        <div className={styles.aiSeekEmploymentContent}>
            {list?.map((item: ListItem) => {
                return (
                    <div className={styles.item} key={item.code}>
                        <div className={styles.left}>
                            <div className={[styles.item_status, item.activityStatus === 2 ? styles.active : ''].join(' ')}>{item.activityStatusName}</div>
                            <img src={item.coverUrl} alt="" className={styles.item_cover} />
                        </div>
                        <div className={styles.right}>
                            <div className={styles.title}>{item.activityName}</div>
                            <div className={styles.time}>{item.dateDesc}</div>
                            <div className={styles.tips}>
                                <div className={styles.adress}>{item.cityDesc}</div>
                                <div className={styles.people}>
                                    <IconFont type="icon-yanjingzhengkai" className={styles.yanjingzhengkai_icon} />
                                    <span>{item.pvStr}人</span>
                                </div>
                            </div>
                        </div>
                    </div>
                )
            })}
        </div>
    )
}

export default EmploymentActiveContent
